<template>
	<view>
		<flowtool :outid="formState.Id" :flowid="'8'" :deptid="formState.ProjInfo.DeptId" :outshowbutton="true" :dataname="formState.Name" :formstate="formState"></flowtool>
		<buildinfo :buildid='buildid'></buildinfo>
	</view>
</template>

<script>
	import buildinfo from "../c_buildinfo.vue"
	import flowtool from "../c_flowtool.vue"
	import {
		getbuildlist
	} from '@/common/api.js'
	export default {
		components: {
		  buildinfo,
		  flowtool
		},
		data() {
			return {
				buildid:null,
				formState:{Name:'',ProjInfo:{Dept:{Id:''}}},
			}
		},
		onLoad(opt) {
			this.buildid = opt.id
			this.getdate()
		},	
		methods: {
			getdate()
			{
				let para = {
					Parameters: [],
				}
				        para.pageIndex = 1
				        para.pageSize = 20
				para.Parameters.push({
					FieldName: "Id",
					ConditionalType: "Equal",
					FieldValue: this.buildid
				})
				// this.mydata={Name:'22',Addr:'',ProjInfo:{Name:''},BuildManager:""}
				getbuildlist(para).then(res=>{
					// this.mydata={Name:'33',Addr:'',ProjInfo:{Name:''},BuildManager:""}
					// console.log(this.data)
					 this.formState =res.data[0];
					 // console.log(this.data)
				})
			}
		}
	}
</script>

<style>

</style>
